import time

from wzx9_5.po_pytest.Base.Base import Base
from selenium.webdriver.common.by import By

class Page(Base):
    dengu_loc = (By.XPATH,'/html/body/div[2]/div/div[1]/div/a[1]')

    def denglu(self):
        self.click(self.dengu_loc)

    username_loc = (By.NAME,'uname')
    pwd_loc = (By.NAME,'_pwd')

    def username(self):
        self.send_keys(self.username_loc,'18615488780')
    def pwd(self):
        self.send_keys(self.pwd_loc,'lr123456.')

    login_loc = (By.XPATH,'//*[@id="save"]')

    def login(self):
        self.click(self.login_loc)

    wenxin_loc = (By.XPATH,'//*[@id="bindSub"]')
    def wenxin(self):
        self.click(self.wenxin_loc)








    def test_jx(self):
        self.open_url('https://www.jiuxian.com/')
        self.denglu()
        time.sleep(3)
        self.username()
        self.pwd()
        time.sleep(10)
        self.login()
        self.wenxin()
        time.sleep(3)


